package com.sysu.ooad.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.sysu.ooad.dto.GroupFacade;
import com.sysu.ooad.dto.TaskFacade;
import com.sysu.ooad.entity.Course;
import com.sysu.ooad.entity.Group;
import com.sysu.ooad.entity.Homework;
import com.sysu.ooad.entity.Student;
import com.sysu.ooad.entity.Task;

public interface TaskService {
	public Task addTask(String title, String requirement, Date deadline, Course c);
	public void updateTask(Task task);
	public Task findTaskByPosition(int pos, Course c);
	public List<Task> findTasksByCourse(Course c);
	public Homework commitHomework(String fileName, Student student, Task task);
	public List<Homework> findByGroup(Group g);
	public Map<Task, List<Homework> > findTaskHomeworkMapByGroup(Group g);
	public List<Homework> findHomeworksByStudent(Student s);
	public List<Task> findNotCloseTasksByCourse(Course c);
	public List<Homework> findHomeworksByTaskAndGroup(Task task, Group g);
	public Task findTaskById(Integer id);
	public int countOfTasksByCourse(Course c);
	public void sortHomeworksOfOneTaskByLeader(Task task, Student leader, Integer[] sortResult);
	public List<GroupFacade> findGroupsFacadeWithHomeworks(Course c, Task task);
	public void giveScoreToGroup(Task task, Group group, int maxScore, int minScore);
	public List<TaskFacade> findTasksByStudentWithHomework(Student s);
}
